<template>
  <div>
  <el-descriptions title="任务信息"  >
    <el-descriptions-item label="工作流名称">{{dataForm.name}}</el-descriptions-item>
    <el-descriptions-item label="表名名称">{{dataForm.name}}</el-descriptions-item>
    <el-descriptions-item label="失败重试次数">{{dataForm.failRetryTimes}}</el-descriptions-item>
    <el-descriptions-item label="失败重试间隔">{{dataForm.failRetryInterval}}</el-descriptions-item>
    <el-descriptions-item label="延时执行时间">{{dataForm.delayTime}}</el-descriptions-item>
    <el-descriptions-item label="执行用户">{{dataForm.userName}}</el-descriptions-item>
    <el-descriptions-item label="超时标志" >
<!--      <templat slot-scope="scope">-->
<!--        {{-->
<!--          dataForm.timeoutFlag == 0-->
<!--            ? "关闭"-->
<!--            : dataForm.timeoutFlag == 1-->
<!--              ? "打开": ""-->
<!--        }}</templat>-->
    </el-descriptions-item>
    <el-descriptions-item label="超时通知策略">{{dataForm.timeoutNotifyStrategy}}</el-descriptions-item>
    <el-descriptions-item label="超时时长">{{dataForm.timeout}}</el-descriptions-item>
    <el-descriptions-item label="任务提交时间">{{dataForm.submitTime}}</el-descriptions-item>
    <el-descriptions-item label="预期完成时间">{{dataForm.startTime}}</el-descriptions-item>
    <el-descriptions-item label="结束时间">{{dataForm.endTime}}</el-descriptions-item>
  </el-descriptions>
    <el-form label-width="75px" style="margin: 0 auto;width:100%">
      <el-form-item label="任务详情">
        <el-input  type="textarea" :rows="30" v-model="dataForm.sql" style="width: 100%"></el-input>
      </el-form-item>
    </el-form>
  </div>
<!--  <div>-->
<!--  <el-form  :model="dataForm" label-position="left"   label-width="75px" style="margin: 0 auto;width:100%">-->
<!--    <el-form-item label="任务详情:">-->
<!--      <el-input  type="textarea" :rows="30" v-model="dataForm.sql" style="width: 100%"></el-input>-->
<!--    </el-form-item>-->
<!--  </el-form>-->
<!--  </div>-->
<!--  <el-form-item></el-form-item>-->
</template>
<script>
import scheduleApi from '@/api/schedule/schedule'

export default {
  data() {
    return {
      dataForm: {
        name: '',
        taskParams: '',
        submitTime: '',
        startTime: '',
        endTime: '',
        tableName: '',
        failRetryTimes: 0,
        failRetryInterval: 0,
        timeoutFlag: 0,
        timeoutNotifyStrategy: 0,
        timeout: 0
      }
    }
  },
  methods: {
    // 加载banner列表数据
    init(tableName) {
      console.log("schedule----"+tableName)
      scheduleApi.getSchedelDetailByName(tableName).then(response => {
        this.dataForm = response
        console.log("----"+this.dataForm)
      })
    },

  }
};
</script>
